{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "dc000b9f-f804-40cd-8a23-c43fc1745d02",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world\n"
     ]
    }
   ],
   "source": [
    "print(\"hello world\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "3258bb4f-c221-44e5-a933-b0b4b31994f7",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello \" Python\"\n"
     ]
    }
   ],
   "source": [
    "print( \"hello \\\" Python\\\"\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "a4b077bd-5543-43a8-8d5d-a418fee8c4df",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "kkkk k k k k k k\n"
     ]
    }
   ],
   "source": [
    "print(\"\"\"\n",
    "1\n",
    "2\n",
    "3\n",
    "4\n",
    "kkkk k k k k k k\"\"\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "946a6df4-5b58-494e-b840-9e3ba848beaf",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x value is= 123, it's x variable value is 123\n"
     ]
    }
   ],
   "source": [
    "x = 123\n",
    "print( f\"x value is= {x}, it's x variable value is {x}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "caaed06a-72f5-46c8-a633-49d58c021ed2",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"x\" in \"123x456\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "b02b119c-b483-4532-9cac-a59a8f0e5d71",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"x\" in \"123y456\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "24e1deb5-1479-4f91-9237-030bff875c81",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"x\" not in \"123y456\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "9e9a0493-fd53-4765-a9cb-264a9f16b3d4",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'abc123'"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"abc\" + \"123\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "d3b7e5da-3cd4-41c6-bc3e-a3bbc544461a",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "unterminated string literal (detected at line 1) (1766672217.py, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  Cell \u001b[0;32mIn[27], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m    x = \"abc\u001b[0m\n\u001b[0m        ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m unterminated string literal (detected at line 1)\n"
     ]
    }
   ],
   "source": [
    "x = \"abc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "8c5c6e03-39eb-458d-8dab-00dd37494449",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "abcxyz\n"
     ]
    }
   ],
   "source": [
    "x=\"abc\"\n",
    "y=\"xyz\"\n",
    "print (x+y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "ebbb3246-cd0d-4156-977a-86e8b28a9c11",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "222xyz\n",
      "222222222\n"
     ]
    }
   ],
   "source": [
    "x=\"222\"\n",
    "y=\"xyz\"\n",
    "print (x+y)\n",
    "print (x*3)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "83995cf8-18bd-4be6-b65a-19170bdfb050",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a\n",
      "b\n",
      "e\n",
      "e\n",
      "bc\n"
     ]
    }
   ],
   "source": [
    "s = \"abcde\"\n",
    "print (s[0])\n",
    "print (s[1])\n",
    "print (s[4])\n",
    "print (s[-1])\n",
    "print (s[1:3])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "638ae6f2-1192-47df-a35d-6e8477bf27e6",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "el\n"
     ]
    }
   ],
   "source": [
    "o = \"hellopython\"\n",
    "print (o[1:3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "18f0c51c-0e1f-4000-a4ff-b4c9174e4d6c",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    }
   ],
   "source": [
    "str = \"abcdefghijklmn\"\n",
    "a = str.count(str)\n",
    "print(a)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "2d6ba31b-af21-4da8-bbe2-ffcd6d6ff8ea",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "abcdefghijklmn\n"
     ]
    }
   ],
   "source": [
    "print(str)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "b3316623-dfe7-441c-a21a-01f56f930247",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"abcdefghijlkmn\".count('x')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "8ba016f5-04f0-456c-a483-fd071e1bb181",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"xyxyxyxyxy\".count('xy')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "2ff783c0-6e5a-44bb-afe5-b7c8de4dcda0",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"xyxyxyxyxy\".isalnum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "id": "86530abe-5a12-4346-a1b2-8102ad80b80e",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"xyxyxyxyxy\".isalpha()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "id": "ffa3e212-dfe5-4851-9dfd-46e7669acca6",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'a,b,c,d,e,f,g'"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\",\".join(\"abcdefg\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "id": "d337f3d0-cd42-499e-b8d4-b9e6dfbb6b1e",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['a', 'b', 'c', 'd', 'e', 'f', 'g']"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"a,b,c,d,e,f,g\".split(\",\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "891ac64b-94e9-48fe-a4c5-f74ea91f20cb",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"xyz\".startswith(\"x\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1f9a3060-b4a0-4218-b060-918b36386ddb",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
